package tests;

import org.junit.Test;

import classes.B;
import classes.D;


public class PositiveTest {

	@Test
	public void testParameterConstructorSucess() {
		new D(10.0f, -5);
	}

	@Test
	public void testParameterConstructorFailure() {
		new D(-5.3f, -5);
	}

	@Test
	public void testFieldAttributionLevelClassSucess() {
		D obj = new D(10, -5);
		obj.setValue1(10);
	}

	@Test
	public void testFieldAttributionLevelClassFailure() {
		D obj = new D(10, -5);
		obj.setValue1(-5);
	}

	@Test
	public void testDoubleFieldAttributionLevelClassSucess() {
		D obj = new D(10, -5);
		obj.setValue5(10.5);
	}

	@Test
	public void testDoubleFieldAttributionLevelClassFailure() {
		D obj = new D(10, -5);
		obj.setValue5(-10.3);
	}

	@Test
	public void testGetFieldLevelClassSucess() {
		D obj = new D(10, -5);
		obj.setValue3(4.5f);
		obj.getValue3();
	}

	@Test
	public void testGetFieldLevelClassFailure() {
		D obj = new D(10, -5);
		obj.setValue3(-4.5f);
		obj.getValue3();
	}

	@Test
	public void testFieldAttributionLevelInterfaceSucess() {
		B obj = new B(10, -5);
		obj.setValue1(10);
	}

	@Test
	public void testFieldAttributionLevelInterfaceFailure() {
		B obj = new B(10, -5);
		obj.setValue1(-5);
	}

	@Test
	public void testDoubleFieldAttributionLevelInterfaceSucess() {
		B obj = new B(10, -5);
		obj.setValue5(10.5);
	}

	@Test
	public void testDoubleFieldAttributionLevelInterfaceFailure() {
		B obj = new B(10, -5);
		obj.setValue5(-10.3);
	}

	@Test
	public void testGetFieldLevelInterfaceSucess() {
		B obj = new B(10, -5);
		obj.setValue3(4.5f);
		obj.getValue3();
	}

	@Test
	public void testGetFieldLevelInterfaceFailure() {
		B obj = new B(10, -5);
		obj.setValue3(-4.5f);
		obj.getValue3();
	}

}